﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KlubSportowy.Repositories.Memory;
using KlubSportowy.Repositories;

namespace KlubSportowy.Controllers
{
    class MemoryRepositoryContainer : IjTableContainer
    {
        private readonly MemoryDataSource _dataSource;

        public MemoryRepositoryContainer(MemoryDataSource dataSource)
        {
            _dataSource = dataSource;
        }

        public IContributionsRepository ContributionsRepository
        {
            get { return new MemoryContributionsRepository(_dataSource); }
        }

        public IAmountRepository AmountRepository
        {
            get { return new MemoryAmountRepository(_dataSource); }
        }

        public IUserRepository UserRepository
        {
            get { return new MemoryUserRepository(_dataSource); }
        }
    }
}
